/*
 * XML Type:  Investment401kSummary
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Investment401KSummary
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Investment401kSummary(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class Investment401KSummaryImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.Investment401KSummary
{
    
    public Investment401KSummaryImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName YEARTODATE$0 = 
        new javax.xml.namespace.QName("", "YEARTODATE");
    private static final javax.xml.namespace.QName INCEPTTODATE$2 = 
        new javax.xml.namespace.QName("", "INCEPTTODATE");
    private static final javax.xml.namespace.QName PERIODTODATE$4 = 
        new javax.xml.namespace.QName("", "PERIODTODATE");
    
    
    /**
     * Gets the "YEARTODATE" element
     */
    public net.ofx.types.x2003.x04.YearToDate getYEARTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.YearToDate target = null;
            target = (net.ofx.types.x2003.x04.YearToDate)get_store().find_element_user(YEARTODATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "YEARTODATE" element
     */
    public void setYEARTODATE(net.ofx.types.x2003.x04.YearToDate yeartodate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.YearToDate target = null;
            target = (net.ofx.types.x2003.x04.YearToDate)get_store().find_element_user(YEARTODATE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.YearToDate)get_store().add_element_user(YEARTODATE$0);
            }
            target.set(yeartodate);
        }
    }
    
    /**
     * Appends and returns a new empty "YEARTODATE" element
     */
    public net.ofx.types.x2003.x04.YearToDate addNewYEARTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.YearToDate target = null;
            target = (net.ofx.types.x2003.x04.YearToDate)get_store().add_element_user(YEARTODATE$0);
            return target;
        }
    }
    
    /**
     * Gets the "INCEPTTODATE" element
     */
    public net.ofx.types.x2003.x04.InceptToDate getINCEPTTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InceptToDate target = null;
            target = (net.ofx.types.x2003.x04.InceptToDate)get_store().find_element_user(INCEPTTODATE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "INCEPTTODATE" element
     */
    public boolean isSetINCEPTTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INCEPTTODATE$2) != 0;
        }
    }
    
    /**
     * Sets the "INCEPTTODATE" element
     */
    public void setINCEPTTODATE(net.ofx.types.x2003.x04.InceptToDate incepttodate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InceptToDate target = null;
            target = (net.ofx.types.x2003.x04.InceptToDate)get_store().find_element_user(INCEPTTODATE$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.InceptToDate)get_store().add_element_user(INCEPTTODATE$2);
            }
            target.set(incepttodate);
        }
    }
    
    /**
     * Appends and returns a new empty "INCEPTTODATE" element
     */
    public net.ofx.types.x2003.x04.InceptToDate addNewINCEPTTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InceptToDate target = null;
            target = (net.ofx.types.x2003.x04.InceptToDate)get_store().add_element_user(INCEPTTODATE$2);
            return target;
        }
    }
    
    /**
     * Unsets the "INCEPTTODATE" element
     */
    public void unsetINCEPTTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INCEPTTODATE$2, 0);
        }
    }
    
    /**
     * Gets the "PERIODTODATE" element
     */
    public net.ofx.types.x2003.x04.PeriodToDate getPERIODTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PeriodToDate target = null;
            target = (net.ofx.types.x2003.x04.PeriodToDate)get_store().find_element_user(PERIODTODATE$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PERIODTODATE" element
     */
    public boolean isSetPERIODTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PERIODTODATE$4) != 0;
        }
    }
    
    /**
     * Sets the "PERIODTODATE" element
     */
    public void setPERIODTODATE(net.ofx.types.x2003.x04.PeriodToDate periodtodate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PeriodToDate target = null;
            target = (net.ofx.types.x2003.x04.PeriodToDate)get_store().find_element_user(PERIODTODATE$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PeriodToDate)get_store().add_element_user(PERIODTODATE$4);
            }
            target.set(periodtodate);
        }
    }
    
    /**
     * Appends and returns a new empty "PERIODTODATE" element
     */
    public net.ofx.types.x2003.x04.PeriodToDate addNewPERIODTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PeriodToDate target = null;
            target = (net.ofx.types.x2003.x04.PeriodToDate)get_store().add_element_user(PERIODTODATE$4);
            return target;
        }
    }
    
    /**
     * Unsets the "PERIODTODATE" element
     */
    public void unsetPERIODTODATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PERIODTODATE$4, 0);
        }
    }
}
